<?php
namespace app\common\enum;

class GroupBuyingLv extends Base
{
	protected static $options = [0 => '创业合伙人', 1 => '城市合伙人', 2 => '原始股东'];
    protected static $codeOptions = ['tuanzhang' => 0, 'jingli' => 1, 'zongjian' => 2];
    protected static $commissionRateOptions = [0 => 60, 1 => 15, 2 => 7.5];

    public static function code2key($code) {
        return static::$codeOptions[$code];
    }

    public static function code2rate($code) {
    	return static::$commissionRateOptions[static::$codeOptions[$code]];
    }
}
